package com.beta.auth.service;

import com.beta.auth.dto.auth.BetaSdkDto;
import com.beta.auth.dto.auth.GetUserDetailDto;
import com.beta.auth.dto.auth.GetUserInfoDto;
import com.beta.auth.dto.auth.WXAuthState;

import java.io.UnsupportedEncodingException;

/**
 * <p>Pro.UserCenter/com.beta.auth.service.ICommonService</p>
 *
 * @description 自建应用授权接口服务
 * @author: zdwang
 * @date 2021/12/1 15:12
 */
public interface SelfAppAuthService extends AuthService {


    /**
     * 获取企微授权链接
     * @param authState
     * @return
     */
    String getSelfAppAuthUrl(WXAuthState authState) throws UnsupportedEncodingException;


    /**
     * 获取访问用户身份
     *
     * @param code
     * @param flag
     * @return
     */
    GetUserInfoDto getUserInfo(String code, boolean flag);


    /**
     * sdk
     *
     * @param url
     * @return
     */
    BetaSdkDto getBetaSdkDto(String url, String corpId);

    /**
     * 获取成员授权的敏感字段
     * @param userTicket
     * @param flag
     * @return
     */
    GetUserDetailDto getUserDetail(String userTicket, boolean flag);
}
